<include file="public:header"/>
<div class="toptip">
    <div class="toptit">提示：</div>
    <p>系统默认分类不能删除！</p>
</div>
<form id="form1" name="form1" method="post" action="{:U('delete_category')}">
    <div class="list_th">
        <div class="td" style=" width:35%;">
            <label id="chkAll" class="left_padding">
                <input type="checkbox" name="chkAll" id="chk" title="全选/反选"/>分类名称
            </label>
        </div>
        <div class="td center" style=" width:35%;">类型</div>
        <div class="td center" style=" width:20%;">排序</div>
        <div class="td" style=" width:10%;">操作</div>
        <div class="clear"></div>
    </div>

    <volist name="list" id="list">
        <div class="list_tr link_black">
            <div class="td" style=" width:35%;">
                <div class="left_padding striking">
                    <input name="id[]" type="checkbox" id="{$list.id}" value="{$list.id}" <if condition="$list['admin_set']">disabled="disabled"</if>/>
                    {$list.categoryname}<span style="color:#999999;">[id:{$list.id}]</span>
                </div>
            </div>
            <div class="td center" style=" width:35%;">
                <if condition="$list['admin_set']">系统分类<else/>自定义属性</if>
            </div>
            <div class="td center" style=" width:20%;">{$list.category_order}</div>
            <div class="td edit" style=" width:10%;">
                <a href="{:U('edit_category',array('id'=>$list['id']))}">修改</a>
                <if condition="$list['admin_set'] neq 1">
                    <a href="{:U('delete_category',array('id'=>$list['id']))}" class="gray" onclick="return confirm('你确定要删除吗？')">删除</a>
                </if>
            </div>
            <div class="clear"></div>
        </div>
    </volist>
</form>

<empty name="list">
    <div class="list_empty">没有任何信息！</div>
</empty>

<div class="list_foot">
    <div class="btnbox">
        <input type="button" class="admin_submit" id="ButAdd" value="添加分类" onclick="window.location.href='{:U('add_category')}'"/>
        <input type="submit" class="admin_submit" id="ButDel" value="删除所选"/>
    </div>
    <div class="footso"></div>
</div>
<div class="pages">{$page}</div>

</div>
<include file="public:footer"/>

</body>
<script type="text/javascript">
    $(document).ready(function () {
        //批量删除
        $("#ButDel").click(function () {
            if (confirm('你确定要删除吗？')) {
                $("form[name=form1]").submit();
            }
        });
    });
</script>
</html>